//
//  PracticeVC.m
//  LearnAnimals
//
//  Created by Admin on 1/9/13.
//  Copyright (c) 2013 THACHTUYET. All rights reserved.
//

#import "PracticeVC.h"
#import "PracticeLevel1VC.h"
#import "PracticeLevel2VC.h"
#import "PracticeLevel3VC.h"

@interface PracticeVC ()

@end

@implementation PracticeVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)goBackHome:(id)sender
{
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.8];    
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
    [self.navigationController popToRootViewControllerAnimated:NO];

    
}
- (IBAction)goPracticeLevel1:(id)sender
{
    PracticeLevel1VC *practiceLevel1= [[PracticeLevel1VC alloc] initWithNibName:@"PracticeLevel1VC" bundle:nil];
    [UIView beginAnimations:@"push" context:nil];
    [UIView setAnimationDuration:0.8];
    [self.navigationController pushViewController:practiceLevel1 animated:NO];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];

}
- (IBAction)goPracticeLevel2:(id)sender
{
    //PracticeLevel2VC *practiceLevel2= [[PracticeLevel2VC alloc] initWithNibName:@"PracticeLevel1VC" bundle:nil];
    PracticeLevel2VC *practiceLevel2 = [[PracticeLevel2VC alloc]init];
    [UIView beginAnimations:@"push" context:nil];
    [UIView setAnimationDuration:0.8];
    [self.navigationController pushViewController:practiceLevel2 animated:NO];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
}
- (IBAction)goPracticeLevel3:(id)sender
{
    PracticeLevel3VC *practiceLevel3= [[PracticeLevel3VC alloc] initWithNibName:@"PracticeLevel3VC" bundle:nil];
    [UIView beginAnimations:@"push" context:nil];
    [UIView setAnimationDuration:0.8];
    [self.navigationController pushViewController:practiceLevel3 animated:NO];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
}
@end
